package com.wofish.member.service.impl;

import java.util.List;

import com.wofish.member.domain.MemberAdvance;
import com.wofish.member.mapper.MemberAdvanceMapper;
import com.wofish.member.service.IMemberAdvanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wofish.common.core.text.Convert;

/**
 * 余额明细 服务层实现
 * 
 * @author wofish
 * @date 2019-05-21
 */
@Service
public class MemberAdvanceServiceImpl implements IMemberAdvanceService {
	@Autowired
	private MemberAdvanceMapper memberAdvanceMapper;

	/**
     * 查询余额明细信息
     * 
     * @param id 余额明细ID
     * @return 余额明细信息
     */
    @Override
	public MemberAdvance selectMemberAdvanceById(Long id) {
	    return memberAdvanceMapper.selectMemberAdvanceById(id);
	}
	
	/**
     * 查询余额明细列表
     * 
     * @param memberAdvance 余额明细信息
     * @return 余额明细集合
     */
	@Override
	public List<MemberAdvance> selectMemberAdvanceList(MemberAdvance memberAdvance) {
	    return memberAdvanceMapper.selectMemberAdvanceList(memberAdvance);
	}
	
    /**
     * 新增余额明细
     * 
     * @param memberAdvance 余额明细信息
     * @return 结果
     */
	@Override
	public int insertMemberAdvance(MemberAdvance memberAdvance) {
	    return memberAdvanceMapper.insertMemberAdvance(memberAdvance);
	}
	
	/**
     * 修改余额明细
     * 
     * @param memberAdvance 余额明细信息
     * @return 结果
     */
	@Override
	public int updateMemberAdvance(MemberAdvance memberAdvance) {
	    return memberAdvanceMapper.updateMemberAdvance(memberAdvance);
	}

	/**
     * 删除余额明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteMemberAdvanceByIds(String ids) {
		return memberAdvanceMapper.deleteMemberAdvanceByIds(Convert.toStrArray(ids));
	}

}
